package com.rboat.exam.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.exam.mapper.ExamTestUserAnswerMapper;
import com.rboat.exam.domain.ExamTestUserAnswer;
import com.rboat.exam.service.IExamTestUserAnswerService;
import com.rboat.common.core.text.Convert;

/**
 * 考生答题Service业务层处理
 * 
 * @author rboat
 * @date 2019-09-02
 */
@Service
public class ExamTestUserAnswerServiceImpl implements IExamTestUserAnswerService 
{
    @Autowired
    private ExamTestUserAnswerMapper examTestUserAnswerMapper;

    /**
     * 查询考生答题
     * 
     * @param id 考生答题ID
     * @return 考生答题
     */
    @Override
    public ExamTestUserAnswer selectExamTestUserAnswerById(String id)
    {
        return examTestUserAnswerMapper.selectExamTestUserAnswerById(id);
    }

    /**
     * 查询考生答题列表
     * 
     * @param examTestUserAnswer 考生答题
     * @return 考生答题
     */
    @Override
    public List<ExamTestUserAnswer> selectExamTestUserAnswerList(ExamTestUserAnswer examTestUserAnswer)
    {
        return examTestUserAnswerMapper.selectExamTestUserAnswerList(examTestUserAnswer);
    }

    /**
     * 新增考生答题
     * 
     * @param examTestUserAnswer 考生答题
     * @return 结果
     */
    @Override
    public int insertExamTestUserAnswer(ExamTestUserAnswer examTestUserAnswer)
    {
        return examTestUserAnswerMapper.insertExamTestUserAnswer(examTestUserAnswer);
    }

    /**
     * 修改考生答题
     * 
     * @param examTestUserAnswer 考生答题
     * @return 结果
     */
    @Override
    public int updateExamTestUserAnswer(ExamTestUserAnswer examTestUserAnswer)
    {
        return examTestUserAnswerMapper.updateExamTestUserAnswer(examTestUserAnswer);
    }

    /**
     * 删除考生答题对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteExamTestUserAnswerByIds(String ids)
    {
        return examTestUserAnswerMapper.deleteExamTestUserAnswerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除考生答题信息
     * 
     * @param id 考生答题ID
     * @return 结果
     */
    @Override
    public int deleteExamTestUserAnswerById(String id)
    {
        return examTestUserAnswerMapper.deleteExamTestUserAnswerById(id);
    }
}
